<?php
/***
 * 临时性 运行记录 保存 
 */
class Helper_Tlog
{
    static function tofile($file='',$value=null){
        if(@empty($file)) return false;
        $str= date("Y-m-d H:i:s")." ------------------------------------------------ \n ";
        if($value!==null){
    		$str.=var_export($value,1);
    	}else{
    		$str.="Post: ".var_export($_POST,1)."\n";
    		$str.="Get: ".var_export($_GET,1)."\n";
    	}
    	$str.="\r\n" ;
        $handle=fopen(Q::ini('app_config/ROOT_DIR').'/_tmp/log/'.$file,"a+");
        fwrite($handle,$str);
        fclose($handle);
    }
}